package com.lhz.framework.aspect.http;

import com.lhz.project.system.model.entity.base.HttpRecordLog;

/**
 * @Author: LiHuaZhi
 * @Date: 2022/12/20 11:35
 * @Description:
 **/
public class HttpLogContext {
    private static final ThreadLocal<Long> time = new ThreadLocal<>();
    private static final ThreadLocal<HttpRecordLog> log = new ThreadLocal<>();

    public static Long getTime() {
        return time.get();
    }

    public static void setTime(Long t) {
        time.set(t);
    }

    public static HttpRecordLog getLog() {
        return log.get();
    }

    public static void setLog(HttpRecordLog t) {
        log.set(t);
    }

    public static void remove() {
        time.remove();
        log.remove();
    }
}
